﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打开Windows系统的画板</title>
    <script type="text/javascript" language="JavaScript">
        function RunPaint(){
            try{
                let objShell = new ActiveXObject("wscript.shell");//创建wscript.shell对象
                objShell.Run('mspaint');                          //打开操作系统的画板
                objShell = null;                                  //释放资源
            }
            catch(e){
                alert("找不到画板文件");                          //捕获错误
            }
        }
    </script>
</head>
<body>
<input type=button value="打开画板" onclick="RunPaint()">
</body>
</html>